
package com.scs.application.modules.settlement.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.scs.application.core.model.CommonResult;
import com.scs.application.core.service.IBaseService;
import com.scs.application.modules.settlement.entity.BillItem;
import com.scs.application.modules.settlement.request.BillItemQueryRequest;
import com.scs.application.modules.settlement.vo.BillItemVO;
import com.scs.application.modules.thirdparty.dto.ModelInvoiceSyncDTO;
import com.scs.application.modules.thirdparty.request.InvoiceRequest;

import java.util.List;

/**
 * 记账单明细 service 接口
 */
public interface BillItemService extends IBaseService<BillItem> {

    List<BillItem> list(BillItemQueryRequest request);

    List<BillItemVO> listForInvoice(BillItemQueryRequest request);

    List<BillItemVO> listBillItems(BillItemQueryRequest request);

    IPage<BillItemVO> page(BillItemQueryRequest request);

    IPage<BillItemVO> pageForInvoice(BillItemQueryRequest request);

    /**
     * 添加一行明细
     *
     * @param entity
     */
    void add(BillItem entity);

    /**
     * 批量添加明细
     *
     * @param id
     */
    void delete(String id);

    /**
     * 删除一行明细
     *
     * @param children
     */
    void batchSave(List<BillItem> children);

    /**
     * 获取记账金额
     *
     * @param billId
     * @return
     */
    Double totalAmount(String billId);

    CommonResult syncInvoiceStatus(List<ModelInvoiceSyncDTO> modelInvoiceSyncDTOS);

    /**
     * 获取发票信息
     * @param invoiceRequest
     * @return
     */
    public CommonResult getInvoices(InvoiceRequest invoiceRequest);

}
